#define _CRT_SECURE_NO_WARNINGS

#include<stdio.h>
int main()
{
	char c[100];

	int i = 0;
	char ch;
	while ((ch=getchar()) != '\n')
	{
		c[i] = ch;
		i++;
	}

	int letter = 0;
	int digit = 0;
	int other = 0;
	for (i = i - 1; i >= 0; i--)
	{
		if (c[i] >= '0' && c[i] <= '9')
			digit++;
		else if ((c[i] >= 'A' && c[i] <= 'Z' )||( c[i] >= 'a' && c[i] <= 'z'))
			letter++;
		else
			other++;
	}

	printf("letter:%d\ndigit:%d\nother:%d", letter, digit, other);
	return 0;
}